class Solution {
public:
    void reOrderArray(vector<int> &array) {
    	deque<int> odds,evens;
    	for(int i : array)
    	{
    		if(i % 2 == 0)
    			evens.push_back(i);
    		else
    			odds.push_back(i);
    	}
    	int idx = 0;
    	while(!odds.empty())
    	{
    		array[idx++] = odds.front();
    		odds.pop_front();
    	}
    	while(!evens.empty())
    	{
    		array[idx++] = evens.front();
    		evens.pop_front();
    	}
    }
};